<?php
/**
 * 文章内容操作
 * 
 * Created		: 2011-07-17
 * Modified		: 2011-07-20 
 * @link		: http://qixbo.com
 * @copyright	: (C) 2011 Qixbo Inc.
 * @version		: 0.1.0
 * @author		: Joseph Chen (jsph.chen@gmail.com)
 */
class Article extends Model
{
	
	protected $tbl		= 'article';
	protected $priKey	= 'id';
	
	
	
	public function getList($args=array())
	{
		if (!empty($args['keyword']))
		{
			$kw = $args['keyword'];
			$where[] = "title like :title or content like :content";
			$params['title'] = '%'.$kw.'%';
			$params['content'] = '%'.$kw.'%';
		}
		
		$args['where'] = $where;
		
		return parent::getList($args);
	}
}